import pika

def mq_connect():

    credentials = pika.PlainCredentials('user01', '123456')
    connection = pika.BlockingConnection(
        pika.ConnectionParameters(host = 'rabbitmq', credentials = credentials, heartbeat=0))
    channel = connection.channel()

    channel.queue_declare(queue='hello', durable = True)
    return channel